home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga News 96
/
Amiga News 96.iso
/
amig_ad_os
/
françois_gastaldo
/
tsiwf
/
t.s.i.w.f.n°7
/
work
/
ttddd
/
ttddd.doc
< prev
next >
Wrap
Text File
|
1991-02-24
|
8KB
|
147 lines
"Textual TDDD"
Have you ever had a craving to do any of the following within Turbo
Silver?
o Fractal geometry landscapes or other natural phenomena
o Precise algorithmic control over every object in an animation, including
Newtonian physics and dynamic constraints
o Bezier curves and patches
o Bicubic splines and patches
o Super quadric surfaces
o 3-D TeX fonts
o Precise control of the lighting properties of every "face" (triangle) that
makes up an object
o Analyze all of the parameters of an existing object or cell
o and much, much more!
No? I highly doubt that you have never had an urge to do any of the
above, or you would not be interested in computer graphics in the first
place! Do the above sound too good to be true?
Introducing: Textual TDDD. You all know what TDDD stands for: 3D
Data Description. TDDD files describe both cells and objects, and are
based on the IFF file specification. If you had the ability to read and
write these files manually or under the control of another program, you
could experiment with all of the graphics techniques listed above and then
have Turbo Silver 3.0 or SV (or Imagine, hopefully soon) render the stills
and animations for you!
Textual TDDD is a file format that I have devised that contains all
(almost all... keep reading) of the information within the TDDD file, but
is in a straight-ASCII text format. These TTDDD files can be edited with
any text editor or can be created by a program written in any language that
can output ASCII text (C, ARexx, BASIC, etc.). The flexibility that this
allows is extraordinary! The programs I have created to handle TTDDD files
are called "ReadTDDD" and "WriteTDDD". The former creates a TTDDD file
from a TDDD file, and the latter does the reverse. Both programs are
simply filters; i.e. they read one format and write the other.
I have written two programs that create TTDDD files: SQuad and TSTeX.
SQuad creates super quadric surfaces and TSTeX reads a string of text and
creates a 3-D string of characters in the TeX font that you select. (If
you aren't already using AmigaTeX by Tomas Rokicki of Radical Eye Software,
I highly recommend the package!)
TSTeX is easier to understand, so let's talk about it first. Have you
ever rendered a scene of a store or some other building that had text on
it? Or have you ever had any other object that has writing on it, but you
didn't want to create every letter by hand (mainly because of the sloppy-
looking results)? TSTeX allows you to choose any font and any string of
text, and create a 3-D object out of it for use in your renderings. Does
that make sense? There's not a whole lot more I can say about it.
What are super quadric surfaces? They are basically parametric
deformations of spheres along the north-south and east-west axes. Here is
the usage information:
Usage: SQuad E N [a4 Epts Npts a1 a2 a3]
The 'E' and 'N' parameters are mandatory, and specify the power to which
you raise the sin() and cos() functions while creating the sphere. Thus,
if you set both to 1.0, you get a sphere. Exciting, eh? The fun begins
when you change these parameters. The 'E' parameter changes the exponent
in the east-west horizontal plane cross-section of the sphere, and the 'N'
changes the exponent in the north-south cross-section. Making one of these
parameters greater than 1.0 creates a hyperbolic "dent" in the sphere.
Making the parameter less than 1.0, but greater than zero, make the sphere
more of a square in that axis. Here is what the program tells you if you
give it no parameters:
E - east/west deformation exponential (positive)
< 1.0 makes square corners
= 1.0 makes smooth circles
> 1.0 makes hyperbolic slopes
N - north/south deformation exponential (positive)
same effect as E, but in north/south direction
a4 - 'expansion' radius factor - >1.0 for toroidal super quadrics
Epts - number of east/west points
Npts - number of north/south points
a1 - scale factor for X axis
a2 - scale factor for Y axis
a3 - scale factor for Z axis\n
So to create a die (as in a pair of dice) without the "dots", you would
type "SQuad 0.01 0.01". But you are now saying, "Why not just create a
cube in the TS Object Editor"? First of all, super quadrics are wonderful
little things that have a great deal of detail where it is needed. So on
those corners, if you look very closely, they are slightly rounded, and
contain a great number of faces, so when rendered, the specular highlights
bounce off the corners quite nicely. The second reason, and actually the
main reason why I did this whole project to begin with was because I was
frustrated out of my wits using Turbo Silver's Object Editor, and I was
used to creating images algorithmically from the computer graphics course I
took at Caltech. Boy, was that a lot of fun! But let's try a few more
examples before I end:
squad 1.0 1.0 2.0 % Creates a torus (or doughnut)
squad 0.01 0.01 2.0 % Creates a square-edged chain link
squad 2.0 0.01 2.0 % Creates, well, you would have to see it.
And, of course, we have not even started to mess around with the scale
factors. But I think you get a little taste of what I mean.
Now, I would like to explain the situation with these programs, and a
little bit of the history. As I already mentioned, I was fed up with using
the Turbo Silver Object Editor for any serious work, and also wanted to
create objects algorithmically. I called Impulse, spoke to Mike Halvorsen,
and found out that they had no intentions for adding such a thing to Turbo
Silver or to Imagine, for that matter. So I went to work writing these
tools. I got the public domain information about TDDD files from a local
BBS. I finished these tools based on the information contained in those
documents. I generated some objects, and they looked awesome! But every
now and then, and object I created would crash Turbo Silver's Object
Editor!
So I wrote Impulse, and heard no response. I called Impulse, and once
more spoke to Mike Halvorsen. He cut me off quickly after starting to
explain the difficulties, and said "That TDDD information in the public
domain is out of date. Send me a disk and I'll put the latest information
on it. Click." I did, and he did, and when I got the disk back, it had the
exact same information on it. So here I am, with these awesome programs
that I would love to market (since it was a large time investment on my
part) that sometimes crash TS's Object Editor because of incomplete
information about the internals of the program. And I have received no
help from Impulse. So here I am, writing an article about them, and seeing
if anybody in the Turbo SIG is interested in using these programs. If so,
I would be willing to distribute them to Turbo SIG members and hoping that
maybe one or two of you could help me discover what that problem is. I
have already let another person use it to display data he was collecting
for his Master's Thesis. He loves it!
I am hereby releasing ReadTDDD and WriteTDDD as ShareWare. If you use
the programs, please send $10.00 (ten dollars) to my address below. As a
Thank-You, I will send you a disk with SQuad and TSTeX on them, registered
with a serial number personally to you. These programs will NOT be
redistributable. You are allowed to freely distribute ReadTDDD and
WriteTDDD, though, as long as this archive remains intact without any
modifications.
Glenn M. Lewis
8341 Olive Hill Court
Fair Oaks, CA 95628
(I can also be reached at "glewis@pcocd2.intel.com" for those of you with
access to the ARPAnet)